package at.ac.tuwien.ifs.qse.se1.exception;

import java.lang.reflect.Method;
import org.apache.log4j.Logger;
import org.springframework.aop.ThrowsAdvice;

/**
 * todo
 * @author Markus Demolsky
 */
public class DaoExceptionAdvice implements ThrowsAdvice {
    private final Logger log = Logger.getLogger(getClass());
    
    public void afterThrowing(Method m, Object[] args, Object target, IllegalArgumentException e)throws Exception{
        log.error("Exception in a DAO: " + e);
        log.error("Object: " + target);
        log.error("Method: " + m);
    }
}
